Carbon


SoundComponentGetSource

Header: Sound.h Carbon status: Supported

Determines your component’s source component.

ComponentResult SoundComponentGetSource (
    ComponentInstance ti, 
    SoundSource sourceID, 
    ComponentInstance *source
);
Parameter descriptions
ti

A component instance that identifies your sound component.

sourceID

A source ID for the source component chain created by the Apple Mixer.

source

A component instance that identifies your source component.

function result

Returns noErr if successful or an appropriate result code otherwise.

DISCUSSION

Your SoundComponentGetSource function is called by the Sound Manager to retrieve your component’s source component instance. Your component should return, in the source parameter, the component instance of your component’s source. This should be the source component instance your component was passed when the Sound Manager called your SoundComponentSetSource function.

In general, all sound components have sources, except for the source at the beginning of the source component chain. In the unlikely event that your component does not have a source, you should return NULL in the source parameter. A sound output device component is always connected directly to an instance of the Apple Mixer. Accordingly, a sound output device component should return a component instance of the Apple Mixer in the source parameter and a source ID in the sourceID parameter. A utility component can ignore the sourceID parameter.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)